class Person:
    def __init__(self, name, age):
        self.name = name
        self.age = age

    def info(self):
        print(self.name, self.age)


p = Person('SS', 23)
print(p.name, p.age)
p.info()


# 继承
class Teacher(Person):
    def __init__(self, name, age, addre):
        Person.__init__(self, name, age)
        self.addre = addre

    def info(self):
        print(self.name, self.addre, self.age)

    def mk(self):
        print('wwww', self.addre)


t = Teacher('WWWWWWW', 23, 'hy')
print(t.addre)
print(t.name)
print(t.age)
t.info()


class mm():
    def __init__(self):
        print(self)


class m3(mm):

    def __init__(self, name):
        mm.__init__(self)
        self.name = name

    def info(self):
        print(self.name)


op = m3('ww')
print(op.name)
op.info()


class u(object):
    def __init__(self, name):
        self.name = name


class uu(u):
    def __init__(self, name, age):
       # u.__init__(self, name)
        self.name = name
        self.age = age


u1 = u('ss')
print(u1.name)

u2 = uu('name', 23)
print(u2.age, u2.name)
